import VueRouter from 'vue-router'

import home from './components/tarbar/HomeContainer.vue'

import member from './components/tarbar/MemberContainer.vue'

import shopcar from './components/tarbar/ShopcartContainer.vue'

import search from './components/tarbar/SearchContainer.vue'

import newslist from './components/home/NewsList.vue'

import news from './components/home/News.vue'

// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    {path:'/',redirect:'/home'},
  {path:'/home',component:home},
  {path:'/member',component:member},
  {path:'/shopcar',component:shopcar},
  {path:'/search',component:search},
  {path:'/home/newslist',component:newslist},
  {path:'/home/newslist/:id',component:news}
  ],
  linkActiveClass:'mui-active'
})

// 把路由对象暴露出去
export default router